﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MoveCar : MonoBehaviour
{
    float z = 0f;
    public float moveSpeed = 0.1f;//速度
    // 每帧调用一次
    void Update()
    {
        //Time.deltaTime 每帧消耗的时间
        z += moveSpeed *Time.deltaTime;//坐标改变
        transform.position = new Vector3(0, 0, z);//改变位置

       
    }
}
